load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@rules_java//java:defs.bzl", "java_plugin")

package(default_visibility = ["//visibility:public"])

java_plugin(
    name = "auto_service_plugin",
    processor_class = "com.google.auto.service.processor.AutoServiceProcessor",
    deps = [
        "@maven//:com_google_auto_service_auto_service",
    ],
)

java_plugin(
    name = "auto_value_plugin",
    generates_api = 1,
    processor_class = "com.google.auto.value.processor.AutoValueProcessor",
    deps = [
        "@maven//:com_google_auto_value_auto_value",
    ],
)

buildifier(
    name = "buildifier.check",
    exclude_patterns = [
        "./.git/*",
        "./.bazelbsp/*",
    ],
    lint_mode = "warn",
    mode = "diff",
)

buildifier(
    name = "buildifier.fix",
    exclude_patterns = [
        "./.git/*",
        "./.bazelbsp/*",
    ],
    lint_mode = "fix",
    mode = "fix",
)
